package com.zenchn.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@ApiModel(value="客户对象",description="客户对象")
public class TMiCustomerVisit implements Serializable {

    private static final long serialVersionUID = -7871217374955925526L;

    @ApiModelProperty(value="拜访ID")
    private String visitId;

    @ApiModelProperty(value="联系人ID")
    @NotEmpty(message = "联系人不能为空")
    private String contactsId;

    @ApiModelProperty(value="客户ID")
    private String customerId;

    @ApiModelProperty(value="拜访时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private LocalDate visitDate;

    @ApiModelProperty(value="拜访内容")
    private String content;

    @ApiModelProperty(value="机会点")
    private String chance;

    @ApiModelProperty(value="寻求帮助或合作意向")
    private String askForHelp;

    @ApiModelProperty(value="创建人")
    private String creator;

    @ApiModelProperty(value="创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    public String getVisitId() {
        return visitId;
    }

    public void setVisitId(String visitId) {
        this.visitId = visitId == null ? null : visitId.trim();
    }

    public String getContactsId() {
        return contactsId;
    }

    public void setContactsId(String contactsId) {
        this.contactsId = contactsId == null ? null : contactsId.trim();
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId == null ? null : customerId.trim();
    }

    public LocalDate getVisitDate() {
        return visitDate;
    }

    public void setVisitDate(LocalDate visitDate) {
        this.visitDate = visitDate;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public String getChance() {
        return chance;
    }

    public void setChance(String chance) {
        this.chance = chance == null ? null : chance.trim();
    }

    public String getAskForHelp() {
        return askForHelp;
    }

    public void setAskForHelp(String askForHelp) {
        this.askForHelp = askForHelp == null ? null : askForHelp.trim();
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator == null ? null : creator.trim();
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", visitId=").append(visitId);
        sb.append(", contactsId=").append(contactsId);
        sb.append(", customerId=").append(customerId);
        sb.append(", visitDate=").append(visitDate);
        sb.append(", content=").append(content);
        sb.append(", chance=").append(chance);
        sb.append(", askForHelp=").append(askForHelp);
        sb.append(", creator=").append(creator);
        sb.append(", createTime=").append(createTime);
        sb.append("]");
        return sb.toString();
    }
}
